﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="com.burry.util.MapList" %>
<%@ page import="com.burry.services.CatalogService" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Bary</title>
<link rel="stylesheet" type="text/css" id="css" href="Resource/css/main.css">


<link rel="stylesheet" type="text/css" href="Resource/yui/build/fonts/fonts-min.css" />
<link rel="stylesheet" type="text/css" href="Resource/yui/build/datatable/assets/skins/sam/datatable.css" />

<link rel="stylesheet" type="text/css" href="Resource/yui/build/logger/assets/skins/sam/logger.css" />
<link rel="stylesheet" type="text/css" href="Resource/yui/build/treeview/assets/skins/sam/treeview.css" />
<link rel="stylesheet" type="text/css" href="Resource/yui/build/button/assets/skins/sam/button.css" />

<!--Additional custom style rules for this example:-->
<style type="text/css">

.ygtvcheck0 { background: url(Resource/yui/assets/img/check/check0.gif) 0 0 no-repeat; width:16px; cursor:pointer }
.ygtvcheck1 { background: url(Resource/yui/assets/img/check/check1.gif) 0 0 no-repeat; width:16px; cursor:pointer }
.ygtvcheck2 { background: url(Resource/yui/assets/img/check/check2.gif) 0 0 no-repeat; width:16px; cursor:pointer }

</style>

<!--end custom header content for this example-->


<script src="Resource/js/wsGridCtrl.js"></script>
<link rel="stylesheet" type="text/css" id="css" href="Resource/css/main.css">


<script type="text/javascript" src="../resource/js/global.js"></script>


<%
	CatalogService cs = new CatalogService();
	String treeStr = cs.getTreeStr2(CatalogService.allFaCataInfo);
%>

<body id="yahoo-com" class=" yui-skin-sam">
	<div id="framed">
  	<h2>分类折扣</h2>
  </div>
  
  <div>
		<div>请选择分类</div>
<div id="catalogTree"></div>


		
		<div>
			
<script language="javascript">
	
function addCata(uid){
	var tempA=window.prompt('请输入数量限制','');
	var re = (uid+":"+ tempA);  
	$j('numResult').innerHTML = $j('numResult').innerHTML + re + "<br>";
	$j('catalog').value = $j('catalog').value + "," + uid;
	$j('catalogNum').value = $j('catalogNum').value + "," + tempA;
}


<%

//HttpServletRequest sRequest = ServletActionContext.getRequest();
MapList cataMap = (MapList)request.getAttribute("cataList");
StringBuffer sb = new StringBuffer();
sb.append("var m_wsGridCtrl = new wsGridCtrl();");
sb.append("m_wsGridCtrl.initializeDocument(800, \"#FF9999\");");

sb.append("m_wsGridCtrl.InsTab(\"分类编号\", \"*\");");
sb.append("m_wsGridCtrl.InsTab(\"分类名称\", \"300\");");
sb.append("m_wsGridCtrl.InsTab(\"操作\", \"300\");");

sb.append(treeStr);

sb.append("m_wsGridCtrl.GenerateCode();	");

sb.append("m_wsGridCtrl.RecudeAllTree();");

out.print(sb.toString());
%>

</script>		
		</div>
		
<div>录入的数量：</div>
<div id="numResult"></div>
<form action="addModel_good.jsp" id="catalogForm">
	<input type="hidden"  name="beginDate" value="<%=request.getParameter("beginDate")%>"/>
	<input type="hidden"  name="endDate" value="<%=request.getParameter("endDate")%>"/>
	<input type="hidden"  name="modelType" value="<%=request.getParameter("modelType")%>"/>
	<input type="hidden"  name="disType" value="<%=request.getParameter("disType")%>"/>
	<input type="hidden"  name="disValue" value="<%=request.getParameter("disValue")%>"/>
	<input type="hidden"  name="plusValue" value="<%=request.getParameter("plusValue")%>"/>
	
	<input type="hidden" id="catalog" name="catalog" />
	<input type="hidden" id="catalogNum" name="catalogNum" />
</form>		
		<div><input type="button" value="上一步" onclick="preStep()" /> &nbsp;<input type="button" value="下一步" onclick="nextStep()" /></div>
		
		
		<script language="javascript">
			function nextStep(){
				
				//alert($j('catalogNum').value);
				$j('catalogForm').submit();
				//location = "addModel_good.jsp";
			}	
			
			function preStep(){
				history.go(-1);
			}
		</script>
  </div>
</body>
</html>